package com.cn.wxwinnie.effectivejava.ex4;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Student {
	private Integer id;
	private String stuNo;
	private String name;
	private Date birthday;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getStuNo() {
		return stuNo;
	}

	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	private static final SimpleDateFormat sdf;
	static {
		sdf = new SimpleDateFormat("yyyy-MM-dd");
	}
	@Override
	public String toString() {
		System.out.println(sdf.toString());
		return "Student: [id=" + id + ", stuNo=" + stuNo + ", name=" + name
				+ ", birthday=" + sdf.format(birthday) + "]";
	}

}
